package cn.zyl.common.redis.exception;

/** MiniRedisException 异常类说明: mini redis基本异常信息
 * @author wsz
 * @date 2020-08-05
 * @version v1.0
 */
public class MiniRedisException extends RuntimeException {
    public MiniRedisException(String msg){ super(msg);}
    public MiniRedisException(Throwable e){ super(e);}
    public MiniRedisException(String msg, Throwable e){ super(msg,e);}
    public static void isTrueThrow(boolean boo,String msg) throws MiniRedisException {
        if(boo){throw new MiniRedisException(msg);}
    }
    public static void isTrueThrow(boolean boo,Throwable e) throws MiniRedisException {
        if(boo){throw new MiniRedisException(e);}
    }
    public static void isNullThrow(Object o,String msg) throws MiniRedisException {
        isTrueThrow(null == o,msg);
    }
}